package com.qooco.watersystem.extensions.client_handlers;

import com.qooco.watersystem.extensions.CocktailExtension;
import com.smartfoxserver.v2.entities.User;
import com.smartfoxserver.v2.entities.data.ISFSObject;
import com.smartfoxserver.v2.extensions.BaseClientRequestHandler;

public class RestartHandler extends BaseClientRequestHandler {

	@Override
	public void handleClientRequest(User arg0, ISFSObject arg1) 
	{
		CocktailExtension gameExt = (CocktailExtension) getParentExtension();
		
		if (gameExt.getGameRoom().getSize().getUserCount() == 2)
			gameExt.startGame();
	}

}
